home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / RLaB / help / ones < prev    next >
Text File  |  1994-04-25  |  431b  |  20 lines

  1. ones:
  2.  
  3. Syntax:    ones ( M , N )
  4.     ones ( A )
  5.  
  6. Description:
  7.  
  8.     Create a matrix of ones. If the input is two scalars, then
  9.     create a matrix of 1s with dimensions NxM.
  10.  
  11.     If the input is a 2 element matrix, then create a matrix with
  12.     row and column dimensions equal to A[1] and A[2] respectively.
  13.     This is useful when used in conjunction with size():
  14.  
  15.     ones( size( X ) )
  16.  
  17.     will return a matrix of ones the same size as X.
  18.  
  19. See Also: zeros
  20.